package com.skiving.cloud;

import com.mybatisflex.core.audit.AuditManager;
import feign.solon.EnableFeignClient;
import org.noear.solon.Solon;
import org.noear.solon.annotation.SolonMain;
import org.noear.solon.web.cors.CrossFilter;

@SolonMain
@EnableFeignClient
public class AdminApp {
    public static void main(String[] args) {
        Solon.start(AdminApp.class, args, app -> {
            //在这儿搞一些初始化配置
            //mybatis-flex打印sql
            AuditManager.setAuditEnable(true);
            //跨域配置
            app.filter(-1, new CrossFilter().allowedMethods("*").allowedOrigins("*")); //加-1 优先级更高
        });
    }
}